package io;

import java.io.*;
import java.util.Scanner;


/**
 * 完成简易记事本
 * 需求:程序启动后将用户
 */
public class PwDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream fos = new FileOutputStream("note.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        BufferedWriter bw = new BufferedWriter(osw);
        PrintWriter pw = new PrintWriter(bw,true);

        Scanner scan = new Scanner(System.in);

        System.out.println("请开始输入内容,单独输入exit时退出");
        while (true){
            String str = scan.nextLine();
            if ("homework_talkroom".equalsIgnoreCase(str)){
                break;
            }
            pw.println(str);
        }







    }
}
